package com.example.administrator.zuce;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

public class ZuCe extends AppCompatActivity {

    String shuruzhanghao;
    String shurumima;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_zu_ce);

        final EditText zhanghao = (EditText) findViewById(R.id.zhanghao);
        final EditText mima = (EditText) findViewById(R.id.mima);
        Button zhuce = (Button) findViewById(R.id.zhuce);
        Button zhaohui = (Button) findViewById(R.id.zhaohui);
        Button denglu = (Button) findViewById(R.id.denglu);
        final TextView textView = (TextView)findViewById(R.id.cuowu);


        zhanghao.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                shuruzhanghao = zhanghao.getText().toString();
            }
        });

        mima.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                shurumima = mima.getText().toString();
            }
        });


        zhuce.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //注册界面
                Intent intent = new Intent();
                intent.setClass(ZuCe.this,zhucejiemian.class);
                startActivity(intent);

            }
        });

        zhaohui.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(ZuCe.this,zhaihuimima.class);
                startActivity(intent);
            }
        });



        denglu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(ZuCe.this,dengluhou.class);
                startActivity(intent);
               /*
               zhucejiemian zhucejiemian = new zhucejiemian();
               for(int i = 0; i < zhucejiemian.yonghuming.length; i++){

                   else if(shuruzhanghao.equals(zhucejiemian.yonghuming[i]) || shurumima.equals(zhucejiemian.mima[i])){
                        //登录成功
                        Intent intent = new Intent();
                        intent.setClass(ZuCe.this,dengluhou.class);
                        startActivity(intent);
                        break;
                    }

                }*/
            }
        });
    }

}
